﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity.InterceptionExtension;

namespace Infrastructure.Aspect.Interceptor
{
    public class ReturnVoidTypeMatchingRule : IMatchingRule
    {
        public ReturnVoidTypeMatchingRule()
        { 
        }
        public bool Matches(System.Reflection.MethodBase member)
        {
            if (member is System.Reflection.MethodInfo)
            {
                var target = member as System.Reflection.MethodInfo;
                if (target.ReturnType.FullName ==  typeof(void).FullName)                
                    return true;                
                else
                    return false;
            }
            else
            {
                return false;
            }            
        }

        
    }
}
